* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}


/* 控制区域样式 */

.control-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    flex-grow: 1;
}

.buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-secondary {
    background-color: #f44336;
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}


/* Tab区域样式 */

.tabs {
    margin-bottom: 15px;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 15px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
}

.tab-btn.active {
    background-color: #fff;
    font-weight: bold;
}


/* 可视化区域样式 */

.visualization-area {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    min-height: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

#tree-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.node {
    cursor: pointer;
}

.node rect {
    fill: #fff;
    stroke: #999;
    stroke-width: 2px;
    rx: 5;
    ry: 5;
}

.node.male rect {
    stroke: #3498db;
}

.node.female rect {
    stroke: #e74c3c;
}

.node text {
    font-size: 12px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.link {
    fill: none;
    stroke: #ccc;
    stroke-width: 2px;
}

.tooltip {
    position: absolute;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 5px;
    pointer-events: none;
    z-index: 10;
    max-width: 300px;
}

.zoom-buttons {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}